<template>
  <!-- 事件调度dialog-->
  <el-dialog
    title="事件调度"
    :visible="visible"
    @open="openFunc"
    :before-close="resetFun"
    :destroy-on-close="true"
    class="dialog-class1 scale-dialog dialogStyle"
    width="560px"
  >
    <el-form
      :model="ruleForm"
      :rules="rules"
      ref="ruleForm"
      label-width="84px"
      style="margin-right: 3px"
    >
      <el-form-item label="下一环节" prop="flowLink">
        <el-select
          v-model="ruleForm.flowLink"
          @change="getUserTree"
          filterable
          placeholder="请选择..."
        >
          <el-option
            v-for="(item, index) in selectDatas.nextLinkList"
            :key="index"
            :value="item.linkId"
            :label="item.linkName"
          >
          </el-option>
        </el-select>
      </el-form-item>
      <el-form-item
        label="处理人"
        prop="userList"
        v-if="selectDatas.nextLinkList.length > 0 && ruleForm.flowLink != 6"
        class="select-user"
      >
        <tree-select
          v-model="ruleForm.userList"
          :allUserTreeData="allUserTreeData"
          :userTreeData="userTreeData"
          node-key="id"
          default-expand-all
          show-checkbox
          ref="treeSelect"
          :config="{ label: 'userName', value: 'userId' }"
          @check-change="handleCheckChange"
          :isShowAllBtn="isShowAllBtn"
          :isShowAllInfo.sync="isShowAllInfo"
          :nextLinkInfo="
            this.selectDatas.nextLinkList.find(
              (item) => item.curLink == this.ruleForm.flowLink
            )
          "
        />
      </el-form-item>
      <div class="position-info">
        <editUsefulWord
          :isShowUsefulWord.sync="isShowUsefulWord"
        ></editUsefulWord>
      </div>
      <el-form-item label="任务描述" class="small" prop="desc">
        <el-input
          type="textarea"
          v-model="ruleForm.desc"
          @input="ruleForm.desc = ruleForm.desc.replace(/\s+/g, '')"
          placeholder="请输入"
          size="small"
          maxlength="200"
        ></el-input>
      </el-form-item>
      <el-form-item v-show="isShowUsefulWord">
        <useful-word
          style="margin-top: -12px"
          :desc.sync="ruleForm.desc"
          :isShowUsefulWord.sync="isShowUsefulWord"
        ></useful-word>
      </el-form-item>
      <el-form-item style="margin-bottom: 0">
        <FormItemIconTipLabel slot="label" />
        <EventFileUpload
          v-model="ruleForm.orderFileDTOList"
          :loading.sync="uploading"
        />
      </el-form-item>
    </el-form>
    <div slot="footer" class="dialog-footer">
      <el-button
        @click="submitFun('ruleForm')"
        type="primary"
        style="margin-right: 10px"
        :loading="btnLoading || uploading"
        >确 定</el-button
      >
      <el-button @click="resetFun">取 消</el-button>
    </div>
  </el-dialog>
</template>
<script>
import videoImg from "@/assets/image/videoImg.png";
import $ from "jquery";
import { $store, $getUrlParam } from "@/utils/public";
import {
  queryNextLink,
  queryRollbackLink,
  getCustOrganTreeNew,
  sendAlarmOrder,
  getUserTree,
} from "@/api/modules/eventManagement/eventDispatch";
import { uploadImg } from "@/api/applicationManager/index";
import { getFlow } from "@/api/modules/eventManagement/getFlowId";
import { rollBack } from "@/api/modules/eventManagement/eventCheck";
import TreeSelect from "@/components/TreeSelect";
import UsefulWord from "@/views/pages/eventManagement/eventDialog/usefulWord";
import editUsefulWord from "@/views/pages/eventManagement/eventDialog/editUsefulWord";
import EventFileUpload from "../components/EventFileUpload";
import FormItemIconTipLabel from "../components/FormItemIconTipLabel";
export default {
  name: "dispatchDialog",
  components: {
    TreeSelect,
    UsefulWord,
    editUsefulWord,
    EventFileUpload,
    FormItemIconTipLabel,
  },
  data() {
    var validateF = (rule, value, callback) => {
      if (this.ruleForm.userList?.length > 0) {
        callback();
      } else {
        callback(new Error("请选择调度人员"));
      }
    };
    return {
      formData: {},
      selectedUser: [],
      userTreeData: [],
      allUserTreeData: [],
      imageUrlList: [],
      tempImageList: [],
      imageUrl: "",
      order: {
        docVoList: [],
      },
      imageList: [],
      flowLinkOut: "",
      flowId: "",
      flowTemplate: "",
      usersId: [],
      ruleForm: {
        ifFinish: "1",
        flowLink: "",
        flowLinkOut: "",
        org: "",
        userId: [],
        desc: "",
        userList: [],
      },
      selectDatas: {
        //下拉框数据
        typeList: [
          { code: "1", name: "部门调度" },
          { code: "2", name: "人员调度" },
        ],
        orgList: [], //部门
        userList: [],
        nameList: [], //人员
        nextLinkList: [], //环节
        backLinkList: [],
      },
      treeData1: [],
      defaultPropsEdit: {
        expandTrigger: "hover",
        checkStrictly: true,
        disabled: "isChecked",
        value: "orgId",
        label: "orgName",
        children: "children",
      },
      orgLevel:
        $store.get("$loginInfo").orgLevel == null
          ? "0"
          : $store.get("$loginInfo").orgLevel,
      rules: {
        ifFinish: [
          { required: true, message: "请选择", trigger: ["blur", "change"] },
        ],
        flowLink: [
          {
            required: true,
            message: "请选择调度环节",
            trigger: ["blur", "change"],
          },
        ],
        flowLinkOut: [
          {
            required: true,
            message: "请选择回退环节",
            trigger: ["blur", "change"],
          },
        ],
        org: [
          {
            required: true,
            message: "请选择调度部门",
            trigger: ["blur", "change"],
          },
        ],
        userId: [
          {
            required: true,
            message: "请选择调度人员",
            trigger: ["blur", "change"],
          },
        ],
        userList: [
          { validator: validateF, required: true, trigger: ["blur", "change"] },
        ],
        desc: [
          {
            required: false,
            message: "请填写任务描述",
            trigger: ["blur", "change"],
          },
        ],
        // files: [{ validator: validateF, required: true }],
      },
      isChange: 0, //调度给部门是判断所选是否可被调度 0可调度 1提示不可调度给组织 2权限不足不可调度给其他部门
      fileStatus: true,
      loading: false,
      isTenantAdmin: this.$store.getters.userInfo.isTenantAdmin, // 1 租户管理员
      isShowAllBtn: true /** 是否显示全部处理人按钮 */,
      isShowAllInfo: false, // 是否显示全部处理人
      isShowUsefulWord: false, // 是否显示常用语列表
      btnLoading: false,
      showImgViewer: false,
      selectImgIndex: 0,
      uploading: false,
    };
  },
  props: {
    orderData: {
      type: Object,
      default: {},
    },
    orderId: {
      type: String,
      default: "",
    },
    visible: {
      type: Boolean,
      default: false,
    },
  },
  computed: {
    //组织树形结构
    treeDataOrg() {
      const _this = this;
      const cloneData = JSON.parse(JSON.stringify(this.treeData1)); // 对源数据深度克隆
      return cloneData.filter((father) => {
        const branchArr = cloneData.filter(
          (child) => father.orgId === child.parentOrgId
        ); //返回每一项的子级数组
        if (branchArr.length > 0) {
          //如果存在子级，则给父级添加一个children属性，并赋值
          father.children = branchArr;
        }
        const level = this.orgLevel === "0" ? "1" : this.orgLevel;
        if (father.orgLevel === level) {
          _this.checkDefault = father.orgId;
        }
        // return father.orgLevel===level;//返回第一层
        return father.orgLevel === "1"; //返回第一层
      });
    },
  },
  methods: {
    // 字段转换
    transferTreeData(list) {
      return list.map((node) => {
        const { nodeId, ...rest } = node;
        let nodeName = node.userName || node.nodeName;
        const obj = {
          id: nodeId,
          label: nodeName,

          ...rest,
        };
        if (node.children) {
          return {
            ...obj,
            children: this.transferTreeData(node.children),
          };
        }
        return obj;
      });
    },
    getUserTree(linkParam) {
      if (linkParam == "6") {
        return;
      }
      const selectLinkData = this.selectDatas.nextLinkList.filter(
        (item) => item.linkId === linkParam
      );
      this.isShowAllBtn = !(
        selectLinkData[0].dataFilterPermiss === "0" &&
        selectLinkData[0].customAdmin === "1"
      );
      this.isShowAllInfo =
        selectLinkData[0].dataFilterPermiss === "0" && !this.isShowAllBtn;
      const params = {
        curLink: linkParam,
        tenantId: this.$store.getters.userInfo.tenantId
          ? this.$store.getters.userInfo.tenantId
          : this.orderData.tenantId,
        flowId: this.orderData.flowId,
        deviceCode: this.orderData.deviceCode,
        provinceId: this.orderData.provinceId,
        cityId: this.orderData.cityId,
        countyId: this.orderData.countyId,
        warningSource: this.orderData.warningSource,
        gridId: this.orderData.gridId,
        warningTypeId: this.orderData.warningTypeId,
      };
      this.loading = true;
      getUserTree(params).then((res) => {
        this.loading = false;
        if (res.code === 200) {
          this.userTreeData = this.transferTreeData([res.data.sysPowerInfo]);
          this.allUserTreeData = this.transferTreeData([res.data.sysAllInfo]);
          this.userTreeData[0].root = 1;
          this.allUserTreeData[0].root = 1;
          this.$nextTick(() => {
            this.$refs.treeSelect.checkTreeChange();
          });
        }
      });

      // this.dataList = [];
      // this.generateList(this.userTreeData);
    },
    handleCheckChange(data, checked, indeterminate) {
      // const nodes = this.$refs.tree.getCheckedNodes();
      // this.ruleForm.userList = nodes?.filter((elem) => elem.userId);
      // console.log(JSON.parse(JSON.stringify(data)), nodes, "00");
    },
    handleRemove_img(file, fileList) {
      if (!this.allow_img) {
        return;
      }
      let _this = this;
      let type = file.raw.type.indexOf("image") === 0 ? "0" : "-1";
      if (type === -1) {
        return;
      }
      let row = {};
      row = this.imageList[this.getIndex(this.imageList, file.uid)];
      this.removeAaary(this.imageList, file.uid);
      // _this.fileList = _this.imageList.concat(_this.videoList);

      this.showUpload_img();
      // uploadDelete({ fileName: row.fileName }).then((result) => {
      //   if (result.resultStat === 'SUCCESS') {
      //     this.$message.success(resp.result);
      //   } else {
      //     this.$message.error(resp.mess);
      //   }
      // });
    },
    getIndex(_arr, _obj) {
      var len = _arr.length;
      for (var i = 0; i < len; i++) {
        if (_arr[i].uid === _obj) {
          return parseInt(i);
        }
      }
      return -1;
    },
    removeAaary(_arr, _obj) {
      let length = _arr.length;
      for (let i = 0; i < length; i++) {
        if (_arr[i].uid === _obj) {
          if (i === 0) {
            _arr.shift(); //删除并返回数组的第一个元素
            return _arr;
          } else if (i === length - 1) {
            _arr.pop(); //删除并返回数组的最后一个元素
            return _arr;
          } else {
            _arr.splice(i, 1); //删除下标为i的元素
            return _arr;
          }
        }
      }
    },
    showUpload_img() {
      if (this.imageList.length > 4) {
        $("#upload_img ul").next().addClass("isShowVideo");
      } else {
        $("#upload_img ul").next().removeClass("isShowVideo");
      }
    },
    //upload/video上传视频   /upload/img上传图片   ，上传请求中 图片/视频流的名字叫 file
    uploadSectionFile_Image(item) {
      if (!this.allow_img) {
        return;
      }
      let type = item.file.type.indexOf("image") === 0 ? "0" : "-1";
      if (type === -1) {
        $message.warning("请上传图片!");
        return;
      }
      let url = "/upload/img";
      let formData = new FormData();
      formData.append("file", item.file);
      this.fileStatus = false;
      this.postAsyn_t(formData, type, item);
    },
    postAsyn_t(formData, type, item) {
      let _this = this;
      uploadImg(formData).then((result) => {
        this.fileStatus = true;
        if (result.code === 200) {
          if (type == 0) {
            _this.imageList.push({
              fileName: result.data.fileName,
              fileUrl: result.data.fileUrl,
              uid: item.file.uid,
            });
            // _this.fileList = _this.imageList.concat(_this.videoList);
          } else {
            _this.videoList.push({
              fileName: result.data.fileName,
              fileUrl: result.data.fileUrl,
              recordType: 0,
              uid: item.file.uid,
            });
            // _this.fileList = _this.imageList.concat(_this.videoList);

            let count = 0;
            let index = 0;
            $("#uploadid li").each(() => {
              let type = $(this).find("a").text();
              if (!type.indexOf("mp4") != -1) {
                index = count;
              }
              count++;
            });
            setTimeout(() => {
              $("#upload_video img")[index].setAttribute(
                "src",
                videoImg
              );
            }, 500);
          }
          $message.success(result.msg);
          return true;
        } else {
          $message.error(result.msg);
          _this.$refs.upload_img.$data.uploadFiles.pop();
        }
      });
    },
    beforeAvatarUpload_img(file) {
      let all =
        "bmp,jpg,jpeg,png,tif,gif,pcx,tga,exif,fpx,svg,psd,cdr,pcd,dxf,ufo,eps,ai,raw,WMF,webp,avif,apng";
      this.allow_img = true;
      let type = file.type.indexOf("image") === 0 ? "1" : "-1";
      if (type == "-1") {
        $message.warning("请上传图片!");
        return (this.allow_img = false);
      }
      let item = file.type.split("/")[1];
      if (all.indexOf(item) == -1) {
        $message.warning("上传图片格式不对!");
        return (this.allow_img = false);
      }
      return this.allow_img;
    },
    isFinishChange() {
      // this.ruleForm.flowLink = '';
      // this.ruleForm.userId = [];
      // this.ruleForm.flowLinkOut = '';
      // this.ruleForm = {
      //   flowLink: '',
      //   flowLinkOut: '',
      //   org: '',
      //   userId: [],
      //   desc: '',
      // };
    },
    //获取操作人员列表
    // getUserId(linkId) {
    //   const _this = this;
    //   if (!_this.ruleForm.flowLink) {
    //     _this.ruleForm.userId = [];
    //   }
    //   let params = {
    //     flowId: _this.flowId,
    //     linkId: linkId,
    //     orgId: _this.orderData.orgRecord,
    //   };
    //   queryFlowLink(params).then((res) => {
    //     if (res.code === 200) {
    //       let userName = res.data[0].userName.split(",");
    //       let userId = res.data[0].userId.split(",");
    //       let nameData = [];
    //       for (let i in userName) {
    //         nameData.push({
    //           userName: userName[i],
    //           userId: userId[i],
    //         });
    //       }
    //       console.log(nameData);
    //       _this.selectDatas.userList = nameData;
    //     }
    //   });
    // },
    async selectNextLinkList() {
      const _this = this;
      let params = {
        curLink: _this.orderData.linkId,
        flowId: _this.flowId,
        warningSource: _this.orderData.warningSource,
        templateId: _this.orderData.flowTemplate,
      };
      const res = await queryNextLink(params);
      if (res.code === 200) {
        _this.selectDatas.nextLinkList = res.data;
        if (
          _this.selectDatas.nextLinkList &&
          _this.selectDatas.nextLinkList.length == 1
        ) {
          _this.ruleForm.flowLink = res.data[0].linkId;
          this.getUserTree(this.ruleForm.flowLink);
        }
      }
    },
    getFlowIds(tenantId, warningSource, alarmCode) {
      const _this = this;
      getFlow({
        tenantId: tenantId,
        warningSource: warningSource,
        alarmCode: alarmCode,
      }).then((resp) => {
        if (resp.code == 200) {
          let flowFlow = tenantId + "_" + warningSource;
          // flowId = resp.data.flowId;
          _this.flowId = resp.data[flowFlow];
          _this.flowTemplate = _this.orderData.flowTemplate
            ? _this.orderData.flowTemplate
            : _this.flowId;
        } else {
          console.log("");
        }
      });
    },
    //初始化下拉框
    async init() {
      const _this = this;
      // let params = {
      //   curLink: 2,
      // };
      _this.flowTemplate = _this.orderData.flowTemplate;
      if (!_this.orderData.flowId && !_this.flowId) {
        _this.getFlowIds(
          _this.orderData.tenantId,
          _this.orderData.warningSource,
          _this.orderData.warningTypeId
        );
      } else {
        _this.flowId = _this.flowId ? _this.flowId : _this.orderData.flowId;
      }
      // params.flowId = _this.flowId;
      // queryNextLink(params).then((res) => {
      //   if (res.code === 200) {
      //     // debugger
      //     _this.selectDatas.nextLinkList = res.data;
      //   }
      // });
      queryRollbackLink({
        orderId: _this.orderId,
        linkId: _this.orderData.linkId,
      }).then((res) => {
        if (res.code === 200) {
          _this.selectDatas.backLinkList = res.data;
          _this.ruleForm.flowLinkOut = res.data[0].linkId;
        }
      });
      await _this.selectNextLinkList();
    },
    //选中组织树
    chooseTreeItem1(e) {
      //、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、
      let _this = this;
      if (e.length > 0) {
        _this.ruleForm.org = e[e.length - 1];
      }
      _this.isChange = 0;
      for (let i in _this.treeData1) {
        //判断选中的调度是否是部门
        if (_this.treeData1[i].orgId == _this.ruleForm.org) {
          if (_this.treeData1[i].isChecked == true) {
            //isChecked  true不可选择 false 可以选择
            if (_this.treeData1[i].orgType == "2") {
              _this.isChange = 2;
              $message.warning("权限不足无法调度给该部门");
            } else {
              _this.isChange = 1;
              $message.warning("请选择调度给部门");
            }
          }
        }
      }
      if (_this.$refs.selectItem1) {
        _this.$refs.selectItem1.dropDownVisible = false; //监听值发生变化就关闭它
      }
    },
    queryTrees1() {
      //查询组织树
      let _this = this;
      _this.treeData1 = [];
      let param = {
        orgLevel: $store.get("$loginInfo").orgLevel,
        orgId: $store.get("$loginInfo").orgId,
        provinceId: _this.orderData.provinceId,
        cityId: _this.orderData.cityId,
        countyId: _this.orderData.countyId,
        handleFlag: "dispatch",
      };
      getCustOrganTreeNew(param).then((e) => {
        if (e.code === 200) {
          _this.treeData1 = JSON.parse(JSON.stringify(e.data));
        } else {
          _this.treeData1 = [];
        }
      });
    },
    openFunc() {
      let _this = this;
      this.loading = false;
      this.btnLoading = false;
      _this.init();
    },
    typeFunc(param) {
      let _this = this;
      if (param == "1") {
        _this.ruleForm.name = "";
      } else {
        _this.ruleForm.org = "";
      }
    },
    //提交
    submitFun(formName) {
      let _this = this;
      if (_this.isChange == 1) {
        $message.warning("请选择调度给部门");
        return;
      }
      if (_this.isChange == 2) {
        $message.warning("权限不足无法调度给该部门");
        return;
      }

      this.$refs[formName].validate((valid) => {
        if (valid) {
          let flowDataInfo = {};
          if (_this.ruleForm.ifFinish === "1") {
            flowDataInfo = _this.selectDatas.nextLinkList.find(
              (ele) => ele.curLink === _this.ruleForm.flowLink
            );
          } else {
            flowDataInfo = _this.selectDatas.backLinkList.find(
              (ele) => ele.linkId === _this.ruleForm.flowLinkOut
            );
          }
          flowDataInfo.nextEnableAcceptanceMode =
            flowDataInfo.enableAcceptanceMode;
          flowDataInfo.enableAcceptanceMode =
            this.orderData.enableAcceptanceMode;
          let params = {
            ...flowDataInfo,
            flowId: _this.flowId,
            flowTemplate: _this.flowTemplate,
            linkId: flowDataInfo.curLink,
            orderId: _this.orderData.warningOrderId,
            warningOrderId: _this.orderData.warningOrderId,
            // sendMan: $store.get("$loginInfo").userId,
            operator: _this.ruleForm.userId.toString(), //指派给个人时传值
            groupId: _this.ruleForm.org, //指派给部门时传值
            remark: _this.ruleForm.desc,
            voice: "",
            orderFileDTOList: this.ruleForm.orderFileDTOList, // 附件
          };
          params.cityId = this.orderData.cityId;
          params.countyId = this.orderData.countyId;
          params.provinceId = this.orderData.provinceId;
          params.ifFinish = _this.ruleForm.ifFinish;
          // params.linkId = _this.orderData.linkId;
          params.flowLinkOut = _this.ruleForm.flowLinkOut;
          params.isNextLink = "1";
          params.isSign = flowDataInfo.signFlag;
          params.devicePitch = this.orderData.devicePitch; // 俯仰角
          params.alarmReason = this.orderData.alarmReason; // 告警原因
          params.deviceHorizontal = this.orderData.deviceHorizontal; // 水平角
          if (this.ruleForm.flowLink != "6") {
            // 有下一环节
            params.realLinkType = this.selectDatas.nextLinkList.filter(
              (item) => item.linkId == this.ruleForm.flowLink
            )[0].realLinkType;
            params.flowLinkType = "0";
            params.processDTOList = this.ruleForm.userList.map((ele) => ({
              processId: ele.userId,
              processName: ele.userName,
            }));
          } else {
            // 下一环节为完结
            params.realLinkType = "6";
            params.flowLinkType = "0";
            params.processDTOList = [];
          }
          if (this.orderData.updateAddress) {
            params.address = this.orderData.address;
            params.longitude = this.orderData.longitude;
            params.latitude = this.orderData.latitude;
            params.gridId = this.orderData.gridId;
            params.gridName = this.orderData.gridName;
            params.horiAzimuthAngle = this.orderData.horiAzimuthAngle;
            params.checkGridFlag = "1"; // 是否修改网格员  1 是  0 否
          } else {
            params.checkGridFlag = "0";
          }
          if (!this.fileStatus) {
            $message.warning("请等待附件上传完成");
            return;
          }
          if (_this.ruleForm.ifFinish === "1") {
            this.btnLoading = true;
            sendAlarmOrder(params).then((resp) => {
              this.btnLoading = false;
              let msgId = {
                id: this.orderData.warningOrderId,
                status: this.orderData.orderStatus,
              };
              this.$store.dispatch("closeSocketMsg", msgId);
              if (resp && resp.code == 200) {
                let userId = this.$store.getters.userInfo.userId;
                if (
                  ((Array.isArray(this.ruleForm.userList) &&
                    this.ruleForm.userList.find(
                      (item) => item.userId == userId
                    )) ||
                    this.isTenantAdmin == "1") &&
                  this.ruleForm.flowLink != "6"
                ) {
                  // 有下一环节处理权限就自动打开下一环节
                  this.$store.dispatch("tagsView/delView", this.$route);
                  this.refreshSelectedTag(this.$route, params.realLinkType);
                } else {
                  _this.onSuccess();
                }
                _this.resetForm();
              } else {
                $message.error(resp.msg);
              }
            });
          } else {
            params.linkId = flowDataInfo.linkId;
            rollBack(params).then((resp) => {
              if (resp && resp.code == 200) {
                $message.success("回退成功");
                this.onSuccess();
              } else {
                $message.warning(resp.msg);
              }
            });
          }
          this.$emit("update:visible", false);
        }
      });
    },
    onSuccess() {
      const url =
        $getUrlParam("pageType") === "false"
          ? "/eventManagement"
          : "/eventManagement/myEvent";
      this.$store.dispatch("tagsView/delView", this.$route);
      this.$router.push(url);
    },
    resetFun() {
      this.ruleForm = {
        ifFinish: "1",
        flowLink: "",
        flowLinkOut: "",
        org: "",
        userId: [],
        desc: "",
        userList: [],
      };
      this.imageList = [];
      this.tempImageList = [];
      this.imageUrlList = [];
      this.imageUrl = "";
      this.userTreeData = [];
      this.isShowAllBtn = false; /** 是否显示全部处理人按钮 */
      this.isShowAllInfo = false; // 是否显示全部处理人
      this.isShowUsefulWord = false; // 是否显示常用语列表
      this.$emit("update:visible", false);
    },
    refreshSelectedTag(view, realLinkType) {
      location.reload();
    },
    replaceParamVal(oUrl, paramName, replaceWith) {
      var re = eval("/(" + paramName + "=)([^&]*)/gi");
      var nUrl = oUrl.replace(re, paramName + "=" + replaceWith);
      return nUrl;
    },
  },
};
</script>

<style lang="scss" scoped>
/deep/ .el-dialog__body {
  padding: 12px 60px;
}
/deep/ .el-row {
  margin-bottom: 1.5%;
}
.isShowUpBotton {
  /deep/ .el-upload--picture-card {
    display: none;
  }
  /deep/ .el-upload-list__item-status-label {
    display: none;
  }
}
// /deep/ .el-upload--picture-card {
//   border-radius: 5px;
// }
/deep/ .el-form-item__error {
  position: relative;
}
/deep/.select-user .el-form-item__error {
  position: absolute;
  top: 35px;
  left: 5px;
}
/deep/ .submitClass {
  background: #ff6a6c !important;
  color: #ffffff !important;
}
/deep/ .el-select__tags {
  overflow: auto;
  .el-tag.el-tag--info {
    max-width: 80%;
  }
}
/deep/ .isShowVideo {
  display: none !important;
  border: none !important;
}
.dialog-class1 /deep/ .el-form-item__label {
  line-height: 36px !important;
}
/deep/ .el-upload--picture-card {
  width: 93px;
  height: 55px;
  position: relative;
}
/deep/ .el-upload-list--picture-card .el-upload-list__item {
  width: 93px;
  height: 55px;
}
.image-item {
  height: 55px;
  width: 93px;
  border: 1px solid #eee;
  margin-right: 16px;
  margin-bottom: 15px;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}
.mask {
  height: 100%;
  width: 100%;
  background: rgba(0, 0, 0, 0.7);
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  opacity: 0;
  transition: all 0.3s;
  align-items: center;
  justify-content: center;
  i {
    color: #fff;
    font-size: 22px;
    cursor: pointer;
  }
}
.image-item:hover .mask {
  opacity: 1;
}

.position-info {
  margin-top: -10px;
  padding-right: 5px;
  margin-bottom: 5px;
}
.dialogStyle {
  /deep/ .el-dialog {
    border-radius: 4px;
  }
  /deep/ .el-dialog__header {
    padding: 12px;
  }
  /deep/ .el-dialog__footer {
    padding: 12px;
  }
  /deep/ .el-form-item--small.el-form-item {
    margin-bottom: 12px;
  }
  /deep/ .el-form-item .el-form-item__label {
    padding-right: 9px;
  }
  /deep/ .el-textarea__inner {
    height: 60px;
  }
}
</style>
<style>
.scale-dialog .el-image-viewer__wrapper {
  position: fixed;
  left: -25vw;
  right: -25vw;
  top: -25vh;
  bottom: -25vh;
}
.scale-dialog textarea {
  resize: none;
}
</style>
